#include "GameManager.h"

#include <Network/Client.h>
#include <Game/Entity.h>

using namespace Game;

GameManager::GameManager(Network::Client &client)
	: client(client)
{
	//Just an early test event. Of course users won't be able to start the actual game world every time they log in :P
	game_events.func_event("Game-Start").set(this, &Game::GameManager::onEventGameStart);
}

GameManager::~GameManager()
{
}

void GameManager::update(const unsigned int &pulse_ms)
{
	//Update game
	float dt = (float)pulse_ms / 1000.0f;
}

void GameManager::onEventGameStart(const CL_NetGameEvent &e)
{
	cl_log_event("Events", "Start game");

	/*if(client.isGameRunning() == false)
	{
		client.startGame();

		client.getNetGame().send_event(CL_NetGameEvent("Game-Start"));
	}*/
}
